.class public Lcom/melesta/engine/EngineGLSurfaceView;
.super Landroid/opengl/GLSurfaceView;
.source "EngineGLSurfaceView.java"


# static fields
.field private static final HANDLER_CLOSE_IME_KEYBOARD:I = 0x3

.field private static final HANDLER_OPEN_IME_KEYBOARD:I = 0x2

.field private static final TAG:Ljava/lang/String;

.field private static mCocos2dxGLSurfaceView:Lcom/melesta/engine/EngineGLSurfaceView;

.field private static sCocos2dxTextInputWraper:Lcom/melesta/engine/EngineTextInputWraper;

.field private static sHandler:Landroid/os/Handler;


# instance fields
.field private mCocos2dxEditText:Lcom/melesta/engine/EngineEditText;

.field private mCocos2dxRenderer:Lcom/melesta/engine/Renderer;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 21
    const-class v0, Lcom/melesta/engine/EngineGLSurfaceView;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/melesta/engine/EngineGLSurfaceView;->TAG:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .locals 0
    .parameter "context"

    .prologue
    .line 45
    invoke-direct {p0, p1}, Landroid/opengl/GLSurfaceView;-><init>(Landroid/content/Context;)V

    .line 47
    invoke-virtual {p0}, Lcom/melesta/engine/EngineGLSurfaceView;->initView()V

    .line 48
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0
    .parameter "context"
    .parameter "attrs"

    .prologue
    .line 52
    invoke-direct {p0, p1, p2}, Landroid/opengl/GLSurfaceView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 54
    invoke-virtual {p0}, Lcom/melesta/engine/EngineGLSurfaceView;->initView()V

    .line 55
    return-void
.end method

.method static synthetic access$000(Lcom/melesta/engine/EngineGLSurfaceView;)Lcom/melesta/engine/EngineEditText;
    .locals 1
    .parameter "x0"

    .prologue
    .line 16
    iget-object v0, p0, Lcom/melesta/engine/EngineGLSurfaceView;->mCocos2dxEditText:Lcom/melesta/engine/EngineEditText;

    return-object v0
.end method

.method static synthetic access$100()Lcom/melesta/engine/EngineGLSurfaceView;
    .locals 1

    .prologue
    .line 16
    sget-object v0, Lcom/melesta/engine/EngineGLSurfaceView;->mCocos2dxGLSurfaceView:Lcom/melesta/engine/EngineGLSurfaceView;

    return-object v0
.end method

.method static synthetic access$200()Lcom/melesta/engine/EngineTextInputWraper;
    .locals 1

    .prologue
    .line 16
    sget-object v0, Lcom/melesta/engine/EngineGLSurfaceView;->sCocos2dxTextInputWraper:Lcom/melesta/engine/EngineTextInputWraper;

    return-object v0
.end method

.method static synthetic access$300(Lcom/melesta/engine/EngineGLSurfaceView;)Lcom/melesta/engine/Renderer;
    .locals 1
    .parameter "x0"

    .prologue
    .line 16
    iget-object v0, p0, Lcom/melesta/engine/EngineGLSurfaceView;->mCocos2dxRenderer:Lcom/melesta/engine/Renderer;

    return-object v0
.end method

.method public static closeIMEKeyboard()V
    .locals 2

    .prologue
    .line 349
    new-instance v0, Landroid/os/Message;

    invoke-direct {v0}, Landroid/os/Message;-><init>()V

    .line 350
    .local v0, msg:Landroid/os/Message;
    const/4 v1, 0x3

    iput v1, v0, Landroid/os/Message;->what:I

    .line 351
    sget-object v1, Lcom/melesta/engine/EngineGLSurfaceView;->sHandler:Landroid/os/Handler;

    invoke-virtual {v1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 352
    return-void
.end method

.method private static dumpMotionEvent(Landroid/view/MotionEvent;)V
    .locals 9
    .parameter "event"

    .prologue
    const/4 v8, 0x6

    const/4 v7, 0x5

    .line 374
    const/16 v5, 0xa

    new-array v3, v5, [Ljava/lang/String;

    const/4 v5, 0x0

    const-string v6, "DOWN"

    aput-object v6, v3, v5

    const/4 v5, 0x1

    const-string v6, "UP"

    aput-object v6, v3, v5

    const/4 v5, 0x2

    const-string v6, "MOVE"

    aput-object v6, v3, v5

    const/4 v5, 0x3

    const-string v6, "CANCEL"

    aput-object v6, v3, v5

    const/4 v5, 0x4

    const-string v6, "OUTSIDE"

    aput-object v6, v3, v5

    const-string v5, "POINTER_DOWN"

    aput-object v5, v3, v7

    const-string v5, "POINTER_UP"

    aput-object v5, v3, v8

    const/4 v5, 0x7

    const-string v6, "7?"

    aput-object v6, v3, v5

    const/16 v5, 0x8

    const-string v6, "8?"

    aput-object v6, v3, v5

    const/16 v5, 0x9

    const-string v6, "9?"

    aput-object v6, v3, v5

    .line 375
    .local v3, names:[Ljava/lang/String;
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    .line 376
    .local v4, sb:Ljava/lang/StringBuilder;
    invoke-virtual {p0}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    .line 377
    .local v0, action:I
    and-int/lit16 v1, v0, 0xff

    .line 378
    .local v1, actionCode:I
    const-string v5, "event ACTION_"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    aget-object v6, v3, v1

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 379
    if-eq v1, v7, :cond_0

    if-ne v1, v8, :cond_1

    .line 380
    :cond_0
    const-string v5, "(pid "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    shr-int/lit8 v6, v0, 0x8

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    .line 381
    const-string v5, ")"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 383
    :cond_1
    const-string v5, "["

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 384
    const/4 v2, 0x0

    .local v2, i:I
    :goto_0
    invoke-virtual {p0}, Landroid/view/MotionEvent;->getPointerCount()I

    move-result v5

    if-ge v2, v5, :cond_3

    .line 385
    const-string v5, "#"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    .line 386
    const-string v5, "(pid "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {p0, v2}, Landroid/view/MotionEvent;->getPointerId(I)I

    move-result v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    .line 387
    const-string v5, ")="

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {p0, v2}, Landroid/view/MotionEvent;->getX(I)F

    move-result v6

    float-to-int v6, v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    .line 388
    const-string v5, ","

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {p0, v2}, Landroid/view/MotionEvent;->getY(I)F

    move-result v6

    float-to-int v6, v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    .line 389
    add-int/lit8 v5, v2, 0x1

    invoke-virtual {p0}, Landroid/view/MotionEvent;->getPointerCount()I

    move-result v6

    if-ge v5, v6, :cond_2

    .line 390
    const-string v5, ";"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 384
    :cond_2
    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 393
    :cond_3
    const-string v5, "]"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 394
    sget-object v5, Lcom/melesta/engine/EngineGLSurfaceView;->TAG:Ljava/lang/String;

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6}, Lcom/melesta/engine/Log;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 395
    return-void
.end method

.method private getContentText()Ljava/lang/String;
    .locals 1

    .prologue
    .line 148
    iget-object v0, p0, Lcom/melesta/engine/EngineGLSurfaceView;->mCocos2dxRenderer:Lcom/melesta/engine/Renderer;

    invoke-virtual {v0}, Lcom/melesta/engine/Renderer;->getContentText()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static openIMEKeyboard()V
    .locals 2

    .prologue
    .line 342
    new-instance v0, Landroid/os/Message;

    invoke-direct {v0}, Landroid/os/Message;-><init>()V

    .line 343
    .local v0, msg:Landroid/os/Message;
    const/4 v1, 0x2

    iput v1, v0, Landroid/os/Message;->what:I

    .line 344
    sget-object v1, Lcom/melesta/engine/EngineGLSurfaceView;->mCocos2dxGLSurfaceView:Lcom/melesta/engine/EngineGLSurfaceView;

    invoke-direct {v1}, Lcom/melesta/engine/EngineGLSurfaceView;->getContentText()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Landroid/os/Message;->obj:Ljava/lang/Object;

    .line 345
    sget-object v1, Lcom/melesta/engine/EngineGLSurfaceView;->sHandler:Landroid/os/Handler;

    invoke-virtual {v1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 346
    return-void
.end method

.method public static queueAccelerometer(FFFJ)V
    .locals 0
    .parameter "x"
    .parameter "y"
    .parameter "z"
    .parameter "timestamp"

    .prologue
    .line 140
    return-void
.end method


# virtual methods
.method public deleteBackward()V
    .locals 1

    .prologue
    .line 364
    new-instance v0, Lcom/melesta/engine/EngineGLSurfaceView$13;

    invoke-direct {v0, p0}, Lcom/melesta/engine/EngineGLSurfaceView$13;-><init>(Lcom/melesta/engine/EngineGLSurfaceView;)V

    invoke-virtual {p0, v0}, Lcom/melesta/engine/EngineGLSurfaceView;->queueEvent(Ljava/lang/Runnable;)V

    .line 370
    return-void
.end method

.method public getCocos2dxEditText()Lcom/melesta/engine/EngineEditText;
    .locals 1

    .prologue
    .line 153
    iget-object v0, p0, Lcom/melesta/engine/EngineGLSurfaceView;->mCocos2dxEditText:Lcom/melesta/engine/EngineEditText;

    return-object v0
.end method

.method protected initView()V
    .locals 2

    .prologue
    const/4 v1, 0x1

    .line 59
    invoke-virtual {p0, v1}, Lcom/melesta/engine/EngineGLSurfaceView;->setEGLContextClientVersion(I)V

    .line 61
    new-instance v0, Lcom/melesta/engine/EngineGLSurfaceView$1;

    invoke-direct {v0, p0}, Lcom/melesta/engine/EngineGLSurfaceView$1;-><init>(Lcom/melesta/engine/EngineGLSurfaceView;)V

    invoke-virtual {p0, v0}, Lcom/melesta/engine/EngineGLSurfaceView;->setEGLConfigChooser(Landroid/opengl/GLSurfaceView$EGLConfigChooser;)V

    .line 90
    invoke-virtual {p0, v1}, Lcom/melesta/engine/EngineGLSurfaceView;->setFocusableInTouchMode(Z)V

    .line 92
    sput-object p0, Lcom/melesta/engine/EngineGLSurfaceView;->mCocos2dxGLSurfaceView:Lcom/melesta/engine/EngineGLSurfaceView;

    .line 93
    new-instance v0, Lcom/melesta/engine/EngineTextInputWraper;

    invoke-direct {v0, p0}, Lcom/melesta/engine/EngineTextInputWraper;-><init>(Lcom/melesta/engine/EngineGLSurfaceView;)V

    sput-object v0, Lcom/melesta/engine/EngineGLSurfaceView;->sCocos2dxTextInputWraper:Lcom/melesta/engine/EngineTextInputWraper;

    .line 95
    new-instance v0, Lcom/melesta/engine/EngineGLSurfaceView$2;

    invoke-direct {v0, p0}, Lcom/melesta/engine/EngineGLSurfaceView$2;-><init>(Lcom/melesta/engine/EngineGLSurfaceView;)V

    sput-object v0, Lcom/melesta/engine/EngineGLSurfaceView;->sHandler:Landroid/os/Handler;

    .line 127
    return-void
.end method

.method public insertText(Ljava/lang/String;)V
    .locals 1
    .parameter "pText"

    .prologue
    .line 355
    new-instance v0, Lcom/melesta/engine/EngineGLSurfaceView$12;

    invoke-direct {v0, p0, p1}, Lcom/melesta/engine/EngineGLSurfaceView$12;-><init>(Lcom/melesta/engine/EngineGLSurfaceView;Ljava/lang/String;)V

    invoke-virtual {p0, v0}, Lcom/melesta/engine/EngineGLSurfaceView;->queueEvent(Ljava/lang/Runnable;)V

    .line 361
    return-void
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 2
    .parameter "pKeyCode"
    .parameter "pKeyEvent"

    .prologue
    const/4 v0, 0x1

    .line 312
    sparse-switch p1, :sswitch_data_0

    .line 329
    invoke-virtual {p0}, Lcom/melesta/engine/EngineGLSurfaceView;->isEnabled()Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-super {p0, p1, p2}, Landroid/opengl/GLSurfaceView;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    :cond_0
    :goto_0
    return v0

    .line 315
    :sswitch_0
    invoke-virtual {p0}, Lcom/melesta/engine/EngineGLSurfaceView;->isEnabled()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 316
    new-instance v1, Lcom/melesta/engine/EngineGLSurfaceView$11;

    invoke-direct {v1, p0, p1, p2}, Lcom/melesta/engine/EngineGLSurfaceView$11;-><init>(Lcom/melesta/engine/EngineGLSurfaceView;ILandroid/view/KeyEvent;)V

    invoke-virtual {p0, v1}, Lcom/melesta/engine/EngineGLSurfaceView;->queueEvent(Ljava/lang/Runnable;)V

    goto :goto_0

    .line 326
    :sswitch_1
    invoke-super {p0, p1, p2}, Landroid/opengl/GLSurfaceView;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    goto :goto_0

    .line 329
    :cond_1
    const/4 v0, 0x0

    goto :goto_0

    .line 312
    nop

    :sswitch_data_0
    .sparse-switch
        0x4 -> :sswitch_0
        0x18 -> :sswitch_1
        0x19 -> :sswitch_1
        0x52 -> :sswitch_0
    .end sparse-switch
.end method

.method public onKeyUp(ILandroid/view/KeyEvent;)Z
    .locals 1
    .parameter "keyCode"
    .parameter "event"

    .prologue
    .line 307
    invoke-virtual {p0, p1, p2}, Lcom/melesta/engine/EngineGLSurfaceView;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    return v0
.end method

.method public onPause()V
    .locals 1

    .prologue
    .line 185
    new-instance v0, Lcom/melesta/engine/EngineGLSurfaceView$4;

    invoke-direct {v0, p0}, Lcom/melesta/engine/EngineGLSurfaceView$4;-><init>(Lcom/melesta/engine/EngineGLSurfaceView;)V

    invoke-virtual {p0, v0}, Lcom/melesta/engine/EngineGLSurfaceView;->queueEvent(Ljava/lang/Runnable;)V

    .line 192
    invoke-super {p0}, Landroid/opengl/GLSurfaceView;->onPause()V

    .line 193
    return-void
.end method

.method public onResume()V
    .locals 1

    .prologue
    .line 173
    invoke-super {p0}, Landroid/opengl/GLSurfaceView;->onResume()V

    .line 175
    new-instance v0, Lcom/melesta/engine/EngineGLSurfaceView$3;

    invoke-direct {v0, p0}, Lcom/melesta/engine/EngineGLSurfaceView$3;-><init>(Lcom/melesta/engine/EngineGLSurfaceView;)V

    invoke-virtual {p0, v0}, Lcom/melesta/engine/EngineGLSurfaceView;->queueEvent(Ljava/lang/Runnable;)V

    .line 181
    return-void
.end method

.method protected onSizeChanged(IIII)V
    .locals 1
    .parameter "pNewSurfaceWidth"
    .parameter "pNewSurfaceHeight"
    .parameter "pOldSurfaceWidth"
    .parameter "pOldSurfaceHeight"

    .prologue
    .line 300
    invoke-virtual {p0}, Lcom/melesta/engine/EngineGLSurfaceView;->isInEditMode()Z

    move-result v0

    if-nez v0, :cond_0

    .line 301
    iget-object v0, p0, Lcom/melesta/engine/EngineGLSurfaceView;->mCocos2dxRenderer:Lcom/melesta/engine/Renderer;

    invoke-virtual {v0, p1, p2}, Lcom/melesta/engine/Renderer;->setScreenWidthAndHeight(II)V

    .line 303
    :cond_0
    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 24
    .parameter "pMotionEvent"

    .prologue
    .line 197
    invoke-virtual/range {p0 .. p0}, Lcom/melesta/engine/EngineGLSurfaceView;->isEnabled()Z

    move-result v23

    if-nez v23, :cond_0

    const/16 v23, 0x0

    .line 291
    :goto_0
    return v23

    .line 200
    :cond_0
    invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getPointerCount()I

    move-result v12

    .line 201
    .local v12, pointerNumber:I
    new-array v9, v12, [I

    .line 202
    .local v9, ids:[I
    new-array v0, v12, [F

    move-object/from16 v17, v0

    .line 203
    .local v17, xs:[F
    new-array v0, v12, [F

    move-object/from16 v22, v0

    .line 205
    .local v22, ys:[F
    const/4 v4, 0x0

    .local v4, i:I
    :goto_1
    if-ge v4, v12, :cond_1

    .line 206
    move-object/from16 v0, p1

    invoke-virtual {v0, v4}, Landroid/view/MotionEvent;->getPointerId(I)I

    move-result v23

    aput v23, v9, v4

    .line 207
    move-object/from16 v0, p1

    invoke-virtual {v0, v4}, Landroid/view/MotionEvent;->getX(I)F

    move-result v23

    aput v23, v17, v4

    .line 208
    move-object/from16 v0, p1

    invoke-virtual {v0, v4}, Landroid/view/MotionEvent;->getY(I)F

    move-result v23

    aput v23, v22, v4

    .line 205
    add-int/lit8 v4, v4, 0x1

    goto :goto_1

    .line 211
    :cond_1
    invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v23

    move/from16 v0, v23

    and-int/lit16 v0, v0, 0xff

    move/from16 v23, v0

    packed-switch v23, :pswitch_data_0

    .line 291
    :goto_2
    :pswitch_0
    const/16 v23, 0x1

    goto :goto_0

    .line 213
    :pswitch_1
    invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v23

    shr-int/lit8 v11, v23, 0x8

    .line 214
    .local v11, indexPointerDown:I
    move-object/from16 v0, p1

    invoke-virtual {v0, v11}, Landroid/view/MotionEvent;->getPointerId(I)I

    move-result v6

    .line 215
    .local v6, idPointerDown:I
    move-object/from16 v0, p1

    invoke-virtual {v0, v11}, Landroid/view/MotionEvent;->getX(I)F

    move-result v14

    .line 216
    .local v14, xPointerDown:F
    move-object/from16 v0, p1

    invoke-virtual {v0, v11}, Landroid/view/MotionEvent;->getY(I)F

    move-result v19

    .line 218
    .local v19, yPointerDown:F
    new-instance v23, Lcom/melesta/engine/EngineGLSurfaceView$5;

    move-object/from16 v0, v23

    move-object/from16 v1, p0

    move/from16 v2, v19

    invoke-direct {v0, v1, v6, v14, v2}, Lcom/melesta/engine/EngineGLSurfaceView$5;-><init>(Lcom/melesta/engine/EngineGLSurfaceView;IFF)V

    move-object/from16 v0, p0

    move-object/from16 v1, v23

    invoke-virtual {v0, v1}, Lcom/melesta/engine/EngineGLSurfaceView;->queueEvent(Ljava/lang/Runnable;)V

    goto :goto_2

    .line 228
    .end local v6           #idPointerDown:I
    .end local v11           #indexPointerDown:I
    .end local v14           #xPointerDown:F
    .end local v19           #yPointerDown:F
    :pswitch_2
    const/16 v23, 0x0

    move-object/from16 v0, p1

    move/from16 v1, v23

    invoke-virtual {v0, v1}, Landroid/view/MotionEvent;->getPointerId(I)I

    move-result v5

    .line 229
    .local v5, idDown:I
    const/16 v23, 0x0

    aget v13, v17, v23

    .line 230
    .local v13, xDown:F
    const/16 v23, 0x0

    aget v18, v22, v23

    .line 232
    .local v18, yDown:F
    new-instance v23, Lcom/melesta/engine/EngineGLSurfaceView$6;

    move-object/from16 v0, v23

    move-object/from16 v1, p0

    move/from16 v2, v18

    invoke-direct {v0, v1, v5, v13, v2}, Lcom/melesta/engine/EngineGLSurfaceView$6;-><init>(Lcom/melesta/engine/EngineGLSurfaceView;IFF)V

    move-object/from16 v0, p0

    move-object/from16 v1, v23

    invoke-virtual {v0, v1}, Lcom/melesta/engine/EngineGLSurfaceView;->queueEvent(Ljava/lang/Runnable;)V

    goto :goto_2

    .line 241
    .end local v5           #idDown:I
    .end local v13           #xDown:F
    .end local v18           #yDown:F
    :pswitch_3
    new-instance v23, Lcom/melesta/engine/EngineGLSurfaceView$7;

    move-object/from16 v0, v23

    move-object/from16 v1, p0

    move-object/from16 v2, v17

    move-object/from16 v3, v22

    invoke-direct {v0, v1, v9, v2, v3}, Lcom/melesta/engine/EngineGLSurfaceView$7;-><init>(Lcom/melesta/engine/EngineGLSurfaceView;[I[F[F)V

    move-object/from16 v0, p0

    move-object/from16 v1, v23

    invoke-virtual {v0, v1}, Lcom/melesta/engine/EngineGLSurfaceView;->queueEvent(Ljava/lang/Runnable;)V

    goto :goto_2

    .line 250
    :pswitch_4
    invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v23

    shr-int/lit8 v10, v23, 0x8

    .line 251
    .local v10, indexPointUp:I
    move-object/from16 v0, p1

    invoke-virtual {v0, v10}, Landroid/view/MotionEvent;->getPointerId(I)I

    move-result v7

    .line 252
    .local v7, idPointerUp:I
    move-object/from16 v0, p1

    invoke-virtual {v0, v10}, Landroid/view/MotionEvent;->getX(I)F

    move-result v15

    .line 253
    .local v15, xPointerUp:F
    move-object/from16 v0, p1

    invoke-virtual {v0, v10}, Landroid/view/MotionEvent;->getY(I)F

    move-result v20

    .line 255
    .local v20, yPointerUp:F
    new-instance v23, Lcom/melesta/engine/EngineGLSurfaceView$8;

    move-object/from16 v0, v23

    move-object/from16 v1, p0

    move/from16 v2, v20

    invoke-direct {v0, v1, v7, v15, v2}, Lcom/melesta/engine/EngineGLSurfaceView$8;-><init>(Lcom/melesta/engine/EngineGLSurfaceView;IFF)V

    move-object/from16 v0, p0

    move-object/from16 v1, v23

    invoke-virtual {v0, v1}, Lcom/melesta/engine/EngineGLSurfaceView;->queueEvent(Ljava/lang/Runnable;)V

    goto/16 :goto_2

    .line 265
    .end local v7           #idPointerUp:I
    .end local v10           #indexPointUp:I
    .end local v15           #xPointerUp:F
    .end local v20           #yPointerUp:F
    :pswitch_5
    const/16 v23, 0x0

    move-object/from16 v0, p1

    move/from16 v1, v23

    invoke-virtual {v0, v1}, Landroid/view/MotionEvent;->getPointerId(I)I

    move-result v8

    .line 266
    .local v8, idUp:I
    const/16 v23, 0x0

    aget v16, v17, v23

    .line 267
    .local v16, xUp:F
    const/16 v23, 0x0

    aget v21, v22, v23

    .line 269
    .local v21, yUp:F
    new-instance v23, Lcom/melesta/engine/EngineGLSurfaceView$9;

    move-object/from16 v0, v23

    move-object/from16 v1, p0

    move/from16 v2, v16

    move/from16 v3, v21

    invoke-direct {v0, v1, v8, v2, v3}, Lcom/melesta/engine/EngineGLSurfaceView$9;-><init>(Lcom/melesta/engine/EngineGLSurfaceView;IFF)V

    move-object/from16 v0, p0

    move-object/from16 v1, v23

    invoke-virtual {v0, v1}, Lcom/melesta/engine/EngineGLSurfaceView;->queueEvent(Ljava/lang/Runnable;)V

    goto/16 :goto_2

    .line 278
    .end local v8           #idUp:I
    .end local v16           #xUp:F
    .end local v21           #yUp:F
    :pswitch_6
    new-instance v23, Lcom/melesta/engine/EngineGLSurfaceView$10;

    move-object/from16 v0, v23

    move-object/from16 v1, p0

    move-object/from16 v2, v17

    move-object/from16 v3, v22

    invoke-direct {v0, v1, v9, v2, v3}, Lcom/melesta/engine/EngineGLSurfaceView$10;-><init>(Lcom/melesta/engine/EngineGLSurfaceView;[I[F[F)V

    move-object/from16 v0, p0

    move-object/from16 v1, v23

    invoke-virtual {v0, v1}, Lcom/melesta/engine/EngineGLSurfaceView;->queueEvent(Ljava/lang/Runnable;)V

    goto/16 :goto_2

    .line 211
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_2
        :pswitch_5
        :pswitch_3
        :pswitch_6
        :pswitch_0
        :pswitch_1
        :pswitch_4
    .end packed-switch
.end method

.method public setCocos2dxEditText(Lcom/melesta/engine/EngineEditText;)V
    .locals 2
    .parameter "pCocos2dxEditText"

    .prologue
    .line 158
    iput-object p1, p0, Lcom/melesta/engine/EngineGLSurfaceView;->mCocos2dxEditText:Lcom/melesta/engine/EngineEditText;

    .line 159
    iget-object v0, p0, Lcom/melesta/engine/EngineGLSurfaceView;->mCocos2dxEditText:Lcom/melesta/engine/EngineEditText;

    if-eqz v0, :cond_0

    sget-object v0, Lcom/melesta/engine/EngineGLSurfaceView;->sCocos2dxTextInputWraper:Lcom/melesta/engine/EngineTextInputWraper;

    if-eqz v0, :cond_0

    .line 160
    iget-object v0, p0, Lcom/melesta/engine/EngineGLSurfaceView;->mCocos2dxEditText:Lcom/melesta/engine/EngineEditText;

    sget-object v1, Lcom/melesta/engine/EngineGLSurfaceView;->sCocos2dxTextInputWraper:Lcom/melesta/engine/EngineTextInputWraper;

    invoke-virtual {v0, v1}, Lcom/melesta/engine/EngineEditText;->setOnEditorActionListener(Landroid/widget/TextView$OnEditorActionListener;)V

    .line 161
    iget-object v0, p0, Lcom/melesta/engine/EngineGLSurfaceView;->mCocos2dxEditText:Lcom/melesta/engine/EngineEditText;

    invoke-virtual {v0, p0}, Lcom/melesta/engine/EngineEditText;->setCocos2dxGLSurfaceView(Lcom/melesta/engine/EngineGLSurfaceView;)V

    .line 162
    invoke-virtual {p0}, Lcom/melesta/engine/EngineGLSurfaceView;->requestFocus()Z

    .line 164
    :cond_0
    return-void
.end method

.method public setEngineRenderer(Lcom/melesta/engine/Renderer;)V
    .locals 1
    .parameter "renderer"

    .prologue
    .line 143
    iput-object p1, p0, Lcom/melesta/engine/EngineGLSurfaceView;->mCocos2dxRenderer:Lcom/melesta/engine/Renderer;

    .line 144
    iget-object v0, p0, Lcom/melesta/engine/EngineGLSurfaceView;->mCocos2dxRenderer:Lcom/melesta/engine/Renderer;

    invoke-virtual {p0, v0}, Lcom/melesta/engine/EngineGLSurfaceView;->setRenderer(Landroid/opengl/GLSurfaceView$Renderer;)V

    .line 145
    return-void
.end method

.method public setRotation(I)V
    .locals 1
    .parameter "rotation"

    .prologue
    .line 398
    iget-object v0, p0, Lcom/melesta/engine/EngineGLSurfaceView;->mCocos2dxRenderer:Lcom/melesta/engine/Renderer;

    invoke-virtual {v0, p1}, Lcom/melesta/engine/Renderer;->setRotation(I)V

    .line 399
    return-void
.end method
